package com.t.bricks.bussiness.db.entity.ordersreceipt.base;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.t.bricks.annotation.DataInfo;

/**
 * 订单发票'OrdersReceipt'表实体类
 * 警告:非数据库字段禁止在此添加,应该创建扩展实体中添加
 * @author HuangXinBian
 */
@ApiModel("订单发票OrdersReceipt")
@DataInfo(sDbName="BricksMall", sTableName="OrdersReceipt")
public class OrdersReceiptBase implements Serializable {

	private static final long serialVersionUID = 1L;// 使用rmi时需修改

	/**
	 * 记录编号(同订单号)
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersReceipt",
		sName="sId", sComment="记录编号(同订单号)", isDbField=true, sDbFileType="varchar",
		sDefaultData="", isExtra=false, iskey=true, isNull=false,
		iMaxLength=10, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=0 )
	@ApiModelProperty(value="记录编号(同订单号)", example="", position=0)
	//[end]
	protected String sId;

	/**
	 * 订单单号
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersReceipt",
		sName="sSequence", sComment="订单单号", isDbField=true, sDbFileType="varchar",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=32, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=1 )
	@ApiModelProperty(value="订单单号", example="", position=1)
	//[end]
	protected String sSequence;

	/**
	 * 顾客账号
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersReceipt",
		sName="sCustomerId", sComment="顾客账号", isDbField=true, sDbFileType="varchar",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=32, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=2 )
	@ApiModelProperty(value="顾客账号", example="", position=2)
	//[end]
	protected String sCustomerId;
	
	/**
	 * 订单总金额
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersReceipt",
		sName="mMoneyOrders", sComment="订单总金额", isDbField=true, sDbFileType="decimal",
		sDefaultData="0.00", isExtra=false, iskey=false, isNull=false,
		iMaxLength=10, isDecimal=false, iIntegralLength=6, iDecimalLength=2, iIndex=3 )
	@ApiModelProperty(value="订单总金额", example="0.00", position=3)
	//[end]
	protected BigDecimal mMoneyOrders;
	
	/**
	 * 支付金额
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersReceipt",
		sName="mMoneyReceipt", sComment="支付金额", isDbField=true, sDbFileType="decimal",
		sDefaultData="0.00", isExtra=false, iskey=false, isNull=false,
		iMaxLength=10, isDecimal=false, iIntegralLength=6, iDecimalLength=2, iIndex=4 )
	@ApiModelProperty(value="支付金额", example="0.00", position=4)
	//[end]
	protected BigDecimal mMoneyReceipt;

	/**
	 * 发票详情
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersReceipt",
		sName="sDetail", sComment="发票详情", isDbField=true, sDbFileType="longtext",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=100, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=5 )
	@ApiModelProperty(value="发票详情", example="", position=5)
	//[end]
	protected String sDetail;

	/**
	 * 备注
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersReceipt",
		sName="sMemo", sComment="备注", isDbField=true, sDbFileType="varchar",
		sDefaultData="", isExtra=false, iskey=false, isNull=true,
		iMaxLength=200, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=6 )
	@ApiModelProperty(value="备注", example="", position=6)
	//[end]
	protected String sMemo;

	/**
	 * 创建者
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersReceipt",
		sName="sCreator", sComment="创建者", isDbField=true, sDbFileType="varchar",
		sDefaultData="00000000", isExtra=false, iskey=false, isNull=false,
		iMaxLength=32, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=7 )
	@ApiModelProperty(value="创建者", example="00000000", position=7)
	//[end]
	protected String sCreator;

	/**
	 * 创建时间
	 */
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")//解决表单提交时字符串时间值错误
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersReceipt",
		sName="dCreateDate", sComment="创建时间", isDbField=true, sDbFileType="datetime",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=23, isDecimal=false, iIntegralLength=-1, iDecimalLength=-1, iIndex=8 )
	@ApiModelProperty(value="创建时间", example="", position=8)
	//[end]
	protected Date dCreateDate;

	/**
	 * 修改人
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersReceipt",
		sName="sModifieder", sComment="修改人", isDbField=true, sDbFileType="varchar",
		sDefaultData="00000000", isExtra=false, iskey=false, isNull=false,
		iMaxLength=32, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=9 )
	@ApiModelProperty(value="修改人", example="00000000", position=9)
	//[end]
	protected String sModifieder;

	/**
	 * 修改时间
	 */
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")//解决表单提交时字符串时间值错误
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersReceipt",
		sName="dModifiedDate", sComment="修改时间", isDbField=true, sDbFileType="datetime",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=23, isDecimal=false, iIntegralLength=-1, iDecimalLength=-1, iIndex=10 )
	@ApiModelProperty(value="修改时间", example="", position=10)
	//[end]
	protected Date dModifiedDate;

	/**
	 * 状态
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersReceipt",
		sName="iState", sComment="状态", isDbField=true, sDbFileType="int",
		sDefaultData="1", isExtra=false, iskey=false, isNull=false,
		iMaxLength=100, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=11 )
	@ApiModelProperty(value="状态", example="1", position=11)
	//[end]
	protected Integer iState;

	/**
	 * 序号
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersReceipt",
		sName="iIndex", sComment="序号", isDbField=true, sDbFileType="int",
		sDefaultData="1", isExtra=false, iskey=false, isNull=false,
		iMaxLength=100, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=12 )
	@ApiModelProperty(value="序号", example="1", position=12)
	//[end]
	protected Integer iIndex;

	/**
	 * 版本号
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersReceipt",
		sName="iVersion", sComment="版本号", isDbField=true, sDbFileType="int",
		sDefaultData="1", isExtra=false, iskey=false, isNull=false,
		iMaxLength=100, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=13 )
	@ApiModelProperty(value="版本号", example="1", position=13)
	//[end]
	protected Integer iVersion;

	/**
	 * 取 记录编号(同订单号)
	 * @return String
	 */
	public String getsId() {
		return sId;
	}

	/**
	 * 设置记录编号(同订单号)
	 * @param sId
	 */
	public void setsId(String sId) {
		this.sId = sId;
	}

	/**
	 * 取 订单单号
	 * @return String
	 */
	public String getsSequence() {
		return sSequence;
	}

	/**
	 * 设置订单单号
	 * @param sSequence
	 */
	public void setsSequence(String sSequence) {
		this.sSequence = sSequence;
	}

	/**
	 * 取 顾客账号
	 * @return String
	 */
	public String getsCustomerId() {
		return sCustomerId;
	}

	/**
	 * 设置顾客账号
	 * @param sCustomerId
	 */
	public void setsCustomerId(String sCustomerId) {
		this.sCustomerId = sCustomerId;
	}

	/**
	 * 取 订单总金额
	 * @return Long
	 */
	public BigDecimal getmMoneyOrders() {
		return mMoneyOrders;
	}

	/**
	 * 设置 订单总金额
	 * @param mMoneyOrders
	 */
	public void setmMoneyOrders(BigDecimal mMoneyOrders) {
		this.mMoneyOrders = mMoneyOrders;
	}

	/**
	 * 取 支付金额
	 * @return Long
	 */
	public BigDecimal getmMoneyReceipt() {
		return mMoneyReceipt;
	}

	/**
	 * 设置 支付金额
	 * @param mMoneyReceipt
	 */
	public void setmMoneyReceipt(BigDecimal mMoneyReceipt) {
		this.mMoneyReceipt = mMoneyReceipt;
	}

	/**
	 * 取 发票详情
	 * @return String
	 */
	public String getsDetail() {
		return sDetail;
	}

	/**
	 * 设置发票详情
	 * @param sDetail
	 */
	public void setsDetail(String sDetail) {
		this.sDetail = sDetail;
	}

	/**
	 * 取 备注
	 * @return String
	 */
	public String getsMemo() {
		return sMemo;
	}

	/**
	 * 设置备注
	 * @param sMemo
	 */
	public void setsMemo(String sMemo) {
		this.sMemo = sMemo;
	}

	/**
	 * 取 创建者
	 * @return String
	 */
	public String getsCreator() {
		return sCreator;
	}

	/**
	 * 设置创建者
	 * @param sCreator
	 */
	public void setsCreator(String sCreator) {
		this.sCreator = sCreator;
	}

	/**
	 * 取 创建时间
	 * @return Date
	 */
	public Date getdCreateDate() {
		return dCreateDate;
	}

	/**
	 * 设置创建时间
	 * @param dCreateDate
	 */
	public void setdCreateDate(Date dCreateDate) {
		this.dCreateDate = dCreateDate;
	}

	/**
	 * 取 修改人
	 * @return String
	 */
	public String getsModifieder() {
		return sModifieder;
	}

	/**
	 * 设置修改人
	 * @param sModifieder
	 */
	public void setsModifieder(String sModifieder) {
		this.sModifieder = sModifieder;
	}

	/**
	 * 取 修改时间
	 * @return Date
	 */
	public Date getdModifiedDate() {
		return dModifiedDate;
	}

	/**
	 * 设置修改时间
	 * @param dModifiedDate
	 */
	public void setdModifiedDate(Date dModifiedDate) {
		this.dModifiedDate = dModifiedDate;
	}

	/**
	 * 取 状态
	 * @return Integer
	 */
	public Integer getiState() {
		return iState;
	}

	/**
	 * 设置状态
	 * @param iState
	 */
	public void setiState(Integer iState) {
		this.iState = iState;
	}

	/**
	 * 取 序号
	 * @return Integer
	 */
	public Integer getiIndex() {
		return iIndex;
	}

	/**
	 * 设置序号
	 * @param iIndex
	 */
	public void setiIndex(Integer iIndex) {
		this.iIndex = iIndex;
	}

	/**
	 * 取 版本号
	 * @return Integer
	 */
	public Integer getiVersion() {
		return iVersion;
	}

	/**
	 * 设置版本号
	 * @param iVersion
	 */
	public void setiVersion(Integer iVersion) {
		this.iVersion = iVersion;
	}

	/**
	 * 复制对象
	 * @param source 数据源
	 * @return OrdersReceiptBase
	 */
	public static OrdersReceiptBase copy(OrdersReceiptBase source) {
		if (null == source) {
			return null;
		}
		
		OrdersReceiptBase target = new OrdersReceiptBase();
		target.setsId(source.getsId());
		target.setsSequence(source.getsSequence());
		target.setsCustomerId(source.getsCustomerId());
		target.setmMoneyOrders(source.getmMoneyOrders());
		target.setmMoneyReceipt(source.getmMoneyReceipt());
		target.setsDetail(source.getsDetail());
		target.setsMemo(source.getsMemo());
		target.setsCreator(source.getsCreator());
		target.setdCreateDate(source.getdCreateDate());
		target.setsModifieder(source.getsModifieder());
		target.setdModifiedDate(source.getdModifiedDate());
		target.setiState(source.getiState());
		target.setiIndex(source.getiIndex());
		target.setiVersion(source.getiVersion());

		return target;
	}
	
	/**
	 * 克隆对象
	 * @return OrdersReceiptBase
	 */
	public OrdersReceiptBase clone() {
		return copy(this);
	}
	
}
